Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Move Object] Bucket handle integration #2840

Merged
merged 14 commits into from
Dec 27, 2024

Conversation

Tulsishah
Copy link
Collaborator

@Tulsishah Tulsishah commented Dec 25, 2024

Description

  • MoveObject bucket handle integration
  • Unit tests are not covered as we're currently using a fake storage server for the rest of our storage client API unit tests. To add unit tests for the MoveObject function, we have two options:
    1. Add a moveObject API to the fake GCS server repository. This would involve extending the fake server's functionality to include support for the move operation. This seems like a more complex solution and time consuming.
    2. Mock the MoveObject API. Mocking is not possible because the MoveObject function takes a private struct from storage library as an argument.

Link to the issue in case of a bug fix.

NA

Testing details

  1. Manual - NA
  2. Unit tests - NA
  3. Integration tests - NA

Copy link

codecov bot commented Dec 25, 2024

Codecov Report

Attention: Patch coverage is 24.39024% with 31 lines in your changes missing coverage. Please review.

Project coverage is 75.98%. Comparing base (3946230) to head (fbeda92).
Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
internal/storage/bucket_handle.go 24.39% 31 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2840      +/-   ##
==========================================
- Coverage   76.05%   75.98%   -0.07%     
==========================================
  Files         118      118              
  Lines       16456    16549      +93     
==========================================
+ Hits        12515    12575      +60     
- Misses       3412     3444      +32     
- Partials      529      530       +1     
Flag Coverage Δ
unittests 75.98% <24.39%> (-0.07%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Tulsishah Tulsishah marked this pull request as ready for review December 26, 2024 04:19
@Tulsishah Tulsishah requested a review from a team as a code owner December 26, 2024 04:19
@kislaykishore kislaykishore requested review from a team and gargnitingoogle and removed request for a team December 26, 2024 04:20
@Tulsishah Tulsishah requested a review from tritone December 26, 2024 05:02
Copy link

@tritone tritone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add an integration test? It should work in prod now as long as your project or bucket prefix are allowlisted.

internal/storage/bucket_handle.go Outdated Show resolved Hide resolved
internal/storage/bucket_handle.go Show resolved Hide resolved
internal/storage/bucket_handle.go Outdated Show resolved Hide resolved
internal/storage/bucket_handle.go Show resolved Hide resolved
@Tulsishah
Copy link
Collaborator Author

Can you add an integration test? It should work in prod now as long as your project or bucket prefix are allowlisted.

I did POC and ran integration tests with MoveObject, it is working fine. To write integration test here, I have to do full integration(fs layer). I'll cover it in later PRs.

@Tulsishah Tulsishah requested a review from tritone December 27, 2024 05:17
@kislaykishore kislaykishore requested a review from a team December 27, 2024 05:17
@Tulsishah Tulsishah merged commit 8f471b4 into master Dec 27, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants